﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaterRevenueMS.Domain.ViewModels.BasicSet.KindOfWaterUse
{
    public class KindOfWaterUseModel : EntityCommon
    {
        public KindOfWaterUseModel()
        {
            Search = new SearchModel();
            OrderNo = 0;
            Yong_SL = 0;
            Yong_SDJ = 0;
            Yong_SLA = 0;
            Yong_SDJA = 0;
            Yong_SLB = 0;
            Yong_SDJB = 0;
            Yong_SLC = 0;
            Yong_SDJC = 0;
            LadderItems = new List<SelectListItem>{
                    new SelectListItem{Text="单阶计量",Value="0"},
                    new SelectListItem{Text="2阶计量",Value="1"},
                    new SelectListItem{Text="3阶计量",Value="2"},
                    new SelectListItem{Text="4阶计量",Value="3"}
            };
        }
        public int Id { get; set; }

        [Display(Name="用水性质")]
        [Required(ErrorMessage="用水性质不能为空")]
        [StringLength(16, MinimumLength = 1, ErrorMessage = "用水性质{2}-{1}个字符")]
        public string Yong_SXZ { get; set; }

        [Display(Name="排序序号")]
        public int OrderNo { get; set; }

        [Display(Name="阶梯设置")]
        public byte Jie_TSZ { get; set; }
        public List<SelectListItem> LadderItems { get; set; }

        [Display(Name="用水量")]
        public float Yong_SL { get; set; }
        [Display(Name = "用水单价")]
        public float Yong_SDJ { get; set; }

        [Display(Name = "计划线A")]
        public float Yong_SLA { get; set; }
        [Display(Name = "A阶单价")]
        public float Yong_SDJA { get; set; }

        [Display(Name = "计划线B")]
        public float Yong_SLB { get; set; }
        [Display(Name = "B阶单价")]
        public float Yong_SDJB { get; set; }
        [Display(Name = "计划线C")]
        public float Yong_SLC { get; set; }
        [Display(Name = "C阶单价")]
        public float Yong_SDJC { get; set; }

        public SearchModel Search { get; set; }

    }
    public class SearchModel
    {
        public SearchModel()
        {
        }

        [Display(Name = "用水性质")]
        public string Yong_SXZ { get; set; }
    }
}
